<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引入Vue -->
    <script type="text/javascript" src="../js/vue.js"></script>
</head>

<body>
    <div id="div">
        <span>{{num}}</span><br>
        <input type="text" v-bind:value="num"><br>
        <!-- 简写：<input type="text" :value="num">   只在页面上展示-->
        <input type="text" v-model:value="num">
        <!-- 简写：<input type="text" v-model="num">   用于交给后台-->
        <p >{{demo.title}}</p>

        <a :href="demo.url">去抖音</a>
    </div>


    <script>
        new Vue({
            el: '#div',
            data() {

                return {
                    num: 30,
                    demo: {
                        title: '我是一个标题',
                        url: 'https://www.douyin.com/'

                    }

                }
            },

        })

    </script>
</body>

</html>